package com.systemsjr.jrappointment.customer;

import com.systemsjr.jrappointment.customer.vo.CustomerVO;
import com.systemsjr.jrappointment.utils.ServiceUtils;
import com.systemsjr.jrappointment.utils.UIUtils;
import com.systemsjr.jrlib.richclient.BaseItemControl;

public class CustomerControl extends BaseItemControl<CustomerVO> {
	
	public CustomerControl(){
		super();
		valueHolder = UIUtils.getCustomerValueHolder();
	}

	@Override
	public void handleDeleteItem(CustomerVO item) {

		ServiceUtils.getCustomerService().delete(item);
		
	}

	@Override
	public CustomerVO handleNewItem() {
		// TODO Auto-generated method stub
		return ServiceUtils.createDefaultCustomer();
	}

	@Override
	public CustomerVO handleSaveItem(CustomerVO item) {

		return ServiceUtils.getCustomerService().save(item);
	}

}
